package com.itheima.mapper;

import com.itheima.domain.User;

import java.util.List;
import java.util.Map;

/*
    持久层操作接口:
        mapper代理开发模式是不需要实现类的
 */
public interface UserMapper {
    //查询所有用户信息
    List<User> selectAll() throws Exception;

    //根据id查询
    User selectById(Integer uid) throws Exception;

    //添加用户信息
    Integer insertUser(User user) throws Exception;

    //修改用户信息
    Integer updateUser(User user) throws Exception;

    //删除用户信息
    Integer deleteUser(Integer uid) throws Exception;

    //登录操作
    User findByNameAndPwd(Map<String,String> map) throws Exception;

    //统计男女人数
    List findSex() throws Exception;

    //if判断查询用户信息
    List findCondition() throws Exception;

    List<User> findCondition1(List list) throws Exception;
}
